#ifndef __MINIUTIL_FRAME_APPCTRL_H__
#define __MINIUTIL_FRAME_APPCTRL_H__

#include <vector>
#include "miniutil/thread.h"
#include "miniutil/threadservice.h"
#include "miniutil/servlets.h"


namespace miniutil { namespace frame {

class CommandQueue
{
public:
    static CommandQueue* GetInstance();
protected:
    static CommandQueue* pinstance;
    CommandQueue();
public:
    void PutCommand(const std::string cmd);
    std::string FetchCommand();
private:
    miniutil::mutex mmtx;
    std::vector<std::string> vcmds;
};

class ConsoleService:public miniutil::frame::ThreadService
{
    public:
	    int WorkingTask();
};

class HttpCommandServlet:public servlet
{
public:
	bool doGet(httpconnector * conn);
};


} }

#endif
